package com.ysd.lis.controller.lab;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.lab.LabTatGrouprule;
import com.ysd.lis.request.lab.LabtatGroupruleSaveOrUpdateParam;
import com.ysd.lis.request.lab.ValidateIsTatTipsParam;
import com.ysd.lis.service.lab.LabTatGroupruleService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author cfz
 * @since 2024-10-30
 */
@RestController
@RequestMapping("/api/lab-tat-grouprule")
public class LabTatGroupruleController extends BaseController {
    @Autowired
    LabTatGroupruleService labTatGroupruleService;

    @ApiOperation("查询")
    @GetMapping("/findLabTatGroupruleList")
    public Result findLabTatGroupruleList(LabTatGrouprule labTatGrouprule) {
        return labTatGroupruleService.findLabTatGroupruleList(labTatGrouprule);
    }

    @ApiOperation("查询分组明细")
    @GetMapping("/findTatGroupruleDetails")
    public Result findTatGroupruleDetails(LabTatGrouprule labTatGrouprule) {
        return labTatGroupruleService.findTatGroupruleDetails(labTatGrouprule);
    }

    @ApiOperation("增加")
    @PostMapping("/addLabTatGrouprule")
    public Result addLabTatGrouprule(@RequestBody LabTatGrouprule labTatGrouprules) {
        return labTatGroupruleService.addLabTatGrouprule(labTatGrouprules);
    }

    @ApiOperation("删除")
    @PostMapping("/deleteLabTatGrouprule")
    public Result deleteLabTatGrouprule(@RequestBody LabTatGrouprule labTatGrouprules) {
        return labTatGroupruleService.deleteLabTatGrouprule(labTatGrouprules);
    }

    @ApiOperation("修改")
    @PostMapping("/updateLabTatGrouprule")
    public Result updateLabTatGrouprule(@RequestBody LabTatGrouprule labTatGrouprule) {
        return labTatGroupruleService.updateLabTatGrouprule(labTatGrouprule);
    }

    @ApiOperation("保存组合")
    @PostMapping("/saveOrUpdateGroupruleList")
    public Result saveOrUpdateGroupruleList(@RequestBody LabtatGroupruleSaveOrUpdateParam input) {
        return labTatGroupruleService.saveOrUpdateGroupruleList(input);
    }

    @ApiOperation("验证是否需要TAT提醒")
    @PostMapping("/validateIsTatTips")
    public Result validateIsTatTips(@RequestBody ValidateIsTatTipsParam input) {
        return labTatGroupruleService.validateIsTatTips(input);
    }
}
